<template>
  <div>
    <p>{{msg}}</p>
    <p>{{$store.state.count}}</p>

    <span>
      <button @click="$store.commit('add')"> +1 </button>
      <button @click="$store.commit('reduce')"> -1 </button>
    </span>

  </div>
</template>

<script>
import store from '@/vuex/store'
export default {
  data(){
    return{
      msg:'Hello Vuex!'
    }
  },
  store
}
</script>
